Splits instantiation of the event source into a separate method,
allowing extensions to subclass the DateMenuButton and provide its
own calendar source.
https://bugzilla.gnome.org/show_bug.cgi?id=672500
}
},
+ _getEventSource: function() {
+ return new Calendar.DBusEventSource();
+ },
+
_setEventSource: function(eventSource) {
if (this._eventSource)
this._eventSource.destroy();
let eventSource;
let showEvents = Main.sessionMode.showCalendarEvents;
if (showEvents) {
- eventSource = new Calendar.DBusEventSource();
+ eventSource = this._getEventSource();
} else {
eventSource = new Calendar.EmptyEventSource();
}